/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cassys.datatransferobjects;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 *
 * @author Priyanka
 */
public class EvaluationDTO implements Comparable<Object> ,Serializable{
    
    private String evaluationId;
    private String studentId;
    private String teamId;
    private String assessmentId;
    private List<EvaluationItemDTO> evalutionItems;
    
    
    public EvaluationDTO(String assessmentId,String evaluationId, String studentId,  String teamId, List<EvaluationItemDTO> evalutionItems) {
        this.evaluationId = evaluationId;
        this.studentId = studentId;
        this.teamId = teamId;
        this.evalutionItems = new ArrayList<EvaluationItemDTO>();
        this.evalutionItems=evalutionItems;
        this.assessmentId=assessmentId;
    }

    public EvaluationDTO() {
        
    }
    
    public EvaluationItemDTO getEvaluationItemById(String evalutionItemId){
        Iterator<EvaluationItemDTO> iter = evalutionItems.iterator();
        while(iter.hasNext()){
            EvaluationItemDTO temp = iter.next();
            if(temp.getEvalutionItemId().equalsIgnoreCase(evalutionItemId));
                return temp;
        }
        return null;
    }
    
    public void setAssessmentId(String assessmentId) {
        this.assessmentId = assessmentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getAssessmentId() {
        return assessmentId;
    }

    public String getStudentId() {
        return studentId;
    }

    public String getAssessmentItemId() {
        return studentId;
    }

    public String getEvaluationId() {
        return evaluationId;
    }

    public List<EvaluationItemDTO> getEvalutionItems() {
        return evalutionItems;
    }

    public void setAssessmentItemId(String assessmentItemId) {
        this.studentId = assessmentItemId;
    }

    public void setEvaluationId(String evaluationId) {
        this.evaluationId = evaluationId;
    }

    public void setEvalutionItems(List<EvaluationItemDTO> evalutionItems) {
        this.evalutionItems = evalutionItems;
    }

    @Override
    public int compareTo(Object o) {return 1;
    }

    public String getTeamId() {
        return teamId;
    }

    public void setTeamId(String teamId) {
        this.teamId = teamId;
    }

    
   
    
    
    
}
